<template>
<div>
  <div style="line-height: 0">
    <el-table
        :data="dataList"
        style="width: 100%;">
      <el-table-column
          prop="orderId"
          header-align="center"
          align="center"
          label="订单号">
      </el-table-column>
      <el-table-column
          prop="status"
          header-align="center"
          align="center"
          :show-overflow-tooltip='true'
          label="审核结果">
        <template slot-scope="scope">
          <el-tag type="success" style="line-height: 25px" v-if="scope.row.status == 0">通过</el-tag>
          <el-tag type="danger" style="line-height: 25px" v-if="scope.row.status == 1">拒绝</el-tag>
        </template>
      </el-table-column>
      <el-table-column
          prop="shipTime"
          header-align="center"
          align="center"
          width="160"

          :show-overflow-tooltip='true'
          label="发货时间">
        <template slot-scope="scope">
          <el-tag type="danger" style="line-height: 25px" v-if="scope.row.shipTime == null">系统未发货</el-tag>
          <el-tag type="primary" style="line-height: 25px" v-if="scope.row.shipTime != null">{{scope.row.shipTime}}</el-tag>
        </template>
      </el-table-column>
      <el-table-column
          prop="receiptTime"
          header-align="center"
          align="center"
          width="160"

          :show-overflow-tooltip='true'
          label="收货时间">
        <template slot-scope="scope">
          <el-tag type="danger" style="line-height: 25px" v-if="scope.row.receiptTime == null">用户未收货</el-tag>
          <el-tag type="success" style="line-height: 25px" v-if="scope.row.receiptTime != null">{{scope.row.receiptTime}}</el-tag>
        </template>
      </el-table-column>
      <el-table-column
          prop="spuId"
          header-align="center"
          align="center"
          :show-overflow-tooltip='true'
          label="货号">
      </el-table-column>

      <el-table-column
          prop="shopImage"
          header-align="center"
          align="center"
          label="商品图片">
        <template slot-scope="scope" >
          　<img :src="scope.row.shopImage" width="40" height="40" style="border-radius: 7px"/>
        </template>
      </el-table-column>
      <el-table-column
          prop="shopStore"
          header-align="center"
          align="center"
          width="160"
          :show-overflow-tooltip='true'
          label="店铺">
      </el-table-column>
      <el-table-column
          prop="shopBrand"
          header-align="center"
          align="center"
          width="160"
          :show-overflow-tooltip='true'
          label="品牌">
      </el-table-column>
      <el-table-column
          prop="shopStyle"
          header-align="center"
          align="center"
          width="160"
          :show-overflow-tooltip='true'
          label="样式">
      </el-table-column>
      <el-table-column
          prop="shopSize"
          header-align="center"
          align="center"
          width="160"
          :show-overflow-tooltip='true'
          label="型号">
      </el-table-column>
      <el-table-column
          prop="num"
          header-align="center"
          align="center"
          :show-overflow-tooltip='true'
          label="数量">
      </el-table-column>
      <el-table-column
          prop="price"
          header-align="center"
          align="center"
          label="价格">
      </el-table-column>
      <el-table-column
          prop="shipName"
          header-align="center"
          align="center"
          :show-overflow-tooltip='true'
          label="收货人">
      </el-table-column>
      <el-table-column
          prop="shipLocation"
          header-align="center"
          align="center"
          width="260"
          :show-overflow-tooltip='true'
          label="收货地址">
      </el-table-column>
      <el-table-column
          prop="shipMobail"
          header-align="center"
          align="center"
          width="200"
          :show-overflow-tooltip='true'
          label="收货电话">
      </el-table-column>
      <el-table-column
          prop="userRemark"
          header-align="center"
          align="center"
          width="200"
          :show-overflow-tooltip='true'
          label="退订理由">
      </el-table-column>
      <el-table-column
          prop="userRemark"
          header-align="center"
          align="center"
          width="200"
          :show-overflow-tooltip='true'
          label="退订理由">
      </el-table-column>
      <el-table-column
          prop="rpUserRemark"
          header-align="center"
          align="center"
          width="200"
          :show-overflow-tooltip='true'
          label="补充说明">
      </el-table-column>
      <el-table-column
          prop="remark"
          header-align="center"
          align="center"
          width="200"
          :show-overflow-tooltip='true'
          label="审核描述">
      </el-table-column>

      <el-table-column
          prop="doshipRoleId"
          header-align="center"
          align="center"
          width="200"
          :show-overflow-tooltip='true'
          label="管理员角色">
        <template slot-scope="scope">
          <el-tag type="success" style="line-height: 25px" v-if="scope.row.doshipRoleId == 1">超级管理员</el-tag>
          <el-tag type="danger" style="line-height: 25px" v-if="scope.row.doshipRoleId == 2">管理员</el-tag>
        </template>
      </el-table-column>
      <el-table-column
          prop="orderTime"
          header-align="center"
          align="center"
          width="160"
          fixed="right"
          :show-overflow-tooltip='true'
          label="下单时间">
        <template slot-scope="scope">

          <el-tag type="primary" style="line-height: 25px">{{scope.row.orderTime}}</el-tag>
        </template>
      </el-table-column>


      <el-table-column
          prop="unsubscribeTime"
          header-align="center"
          align="center"
          width="160"
          fixed="right"
          :show-overflow-tooltip='true'
          label="审核时间">
        <template slot-scope="scope">
          <el-tag type="success" style="line-height: 25px">{{scope.row.unsubscribeTime}}</el-tag>
        </template>
      </el-table-column>
    </el-table>
  </div>
  <div class="page">
    <div class="block">
      <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :page-sizes="[7,15,20,30,50,200]"
          :page-size='pageSize'
          layout="total, sizes, prev, pager, next, jumper"
          :total='total'>
      </el-pagination>
    </div>
  </div>
</div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》'

export default {
//import引入的组件需要注入到对象中才能使用
components: {},
props: {},
data() {
//这里存放数据
return {
  dataList:[],
  pageNum:1,
  pageSize:7,
  total:0,
};
},
//计算属性 类似于data概念
computed: {},
//监控data中的数据变化
watch: {},
//方法集合
methods: {
  page(){
    this.$http({
      url:"order/unsubscribe/page",
      method:"post",
      data:{
        pageNum:this.pageNum,
        pageSize:this.pageSize
      }
    }).then((res)=>{
      this.dataList = res.data.list
      this.total = res.data.page.totalCount
    })
  },
  handleSizeChange(val) {
    this.pageSize = val
    this.page()
  },
  handleCurrentChange(val) {
    this.pageNum = val
    this.page()
  },
},
//声明周期 - 创建完成（可以访问当前this实例）
created() {
  this.page()
},
//声明周期 - 挂载完成（可以访问DOM元素）
mounted() {},
beforeCreate() {}, //生命周期 - 创建之前
beforeMount() {}, //生命周期 - 挂载之前
beforeUpdate() {}, //生命周期 - 更新之前
updated() {}, //生命周期 - 更新之后
beforeDestroy() {}, //生命周期 - 销毁之前
destroyed() {}, //生命周期 - 销毁完成
activated() {} //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>
<style scoped>
</style>
